home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 24
/
Amiga Format AFCD24 (Feb 1998, Issue 108).iso
/
-seriously_amiga-
/
shareware
/
programming
/
c
/
amivogl-mdev
/
src
/
trans.s
< prev
next >
Wrap
Text File
|
1998-01-12
|
11KB
|
608 lines
; Maxon C++ Compiler
; LS2:work/voGL/src/trans.c
mc68020
mc68881
XREF _newtokens
XREF _verror
XREF _cos__r
XREF _sin__r
XREF _std__in
XREF _std__out
XREF _std__err
XREF ___MEMFLAGS
XREF _vdevice
SECTION ":0",CODE
XDEF _translate
_translate
L10 EQU $38
L11 EQU $4CDC
movem.l d2-d4/d6/d7/a2/a3/a6,-(a7)
fmovem.x fp6/fp7,-(a7)
move.s L10+$C(a7),d2
move.s L10+$8(a7),d3
move.s L10+4(a7),d4
XREF userbreak_flagpos
move.l userbreak_flagpos,a1
btst #4,(a1)
bne L12
tst.b _vdevice
bne L1
pea L13
jsr _verror
addq.l #4,a7
L1
tst.b _vdevice+2
beq L2
pea 4.w
jsr _newtokens
addq.l #4,a7
move.l d0,a2
move.l a2,a3
moveq #0,d7
move.l #$26,0(a3,d7.l*4)
move.l a2,a3
moveq #1,d7
move.l d4,0(a3,d7.l*4)
move.l a2,a3
moveq #2,d7
move.l d3,0(a3,d7.l*4)
move.l a2,a3
moveq #3,d7
move.l d2,0(a3,d7.l*4)
fmovem.x (a7)+,[LATEST]
movem.l (a7)+,#L11
rts
L2
move.l _vdevice+$14,a3
lea $30(a3),a3
moveq #0,d7
move.l _vdevice+$14,a6
moveq #0,d6
fmove.s d4,fp7
fmul.s 0(a6,d6.l*4),fp7
move.l _vdevice+$14,a6
lea $10(a6),a6
moveq #0,d6
fmove.s d3,fp6
fmul.s 0(a6,d6.l*4),fp6
fadd.x fp6,fp7
move.l _vdevice+$14,a6
lea $20(a6),a6
moveq #0,d6
fmove.s d2,fp6
fmul.s 0(a6,d6.l*4),fp6
fadd.x fp6,fp7
fmove.s 0(a3,d7.l*4),fp6
fadd.x fp7,fp6
move.l _vdevice+$14,a3
lea $30(a3),a3
moveq #0,d7
fmove.s fp6,0(a3,d7.l*4)
move.l _vdevice+$14,a3
lea $30(a3),a3
moveq #1,d7
move.l _vdevice+$14,a6
moveq #1,d6
fmove.s d4,fp7
fmul.s 0(a6,d6.l*4),fp7
move.l _vdevice+$14,a6
lea $10(a6),a6
moveq #1,d6
fmove.s d3,fp6
fmul.s 0(a6,d6.l*4),fp6
fadd.x fp6,fp7
move.l _vdevice+$14,a6
lea $20(a6),a6
moveq #1,d6
fmove.s d2,fp6
fmul.s 0(a6,d6.l*4),fp6
fadd.x fp6,fp7
fmove.s 0(a3,d7.l*4),fp6
fadd.x fp7,fp6
move.l _vdevice+$14,a3
lea $30(a3),a3
moveq #1,d7
fmove.s fp6,0(a3,d7.l*4)
move.l _vdevice+$14,a3
lea $30(a3),a3
moveq #2,d7
move.l _vdevice+$14,a6
moveq #2,d6
fmove.s d4,fp7
fmul.s 0(a6,d6.l*4),fp7
move.l _vdevice+$14,a6
lea $10(a6),a6
moveq #2,d6
fmove.s d3,fp6
fmul.s 0(a6,d6.l*4),fp6
fadd.x fp6,fp7
move.l _vdevice+$14,a6
lea $20(a6),a6
moveq #2,d6
fmove.s d2,fp6
fmul.s 0(a6,d6.l*4),fp6
fadd.x fp6,fp7
fmove.s 0(a3,d7.l*4),fp6
fadd.x fp7,fp6
move.l _vdevice+$14,a3
lea $30(a3),a3
moveq #2,d7
fmove.s fp6,0(a3,d7.l*4)
move.l _vdevice+$14,a3
lea $30(a3),a3
moveq #3,d7
move.l _vdevice+$14,a6
moveq #3,d6
fmove.s d4,fp7
fmul.s 0(a6,d6.l*4),fp7
move.l _vdevice+$14,a6
lea $10(a6),a6
moveq #3,d6
fmove.s d3,fp6
fmul.s 0(a6,d6.l*4),fp6
fadd.x fp6,fp7
move.l _vdevice+$14,a6
lea $20(a6),a6
moveq #3,d6
fmove.s d2,fp6
fmul.s 0(a6,d6.l*4),fp6
fadd.x fp6,fp7
fmove.s 0(a3,d7.l*4),fp6
fadd.x fp7,fp6
move.l _vdevice+$14,a3
lea $30(a3),a3
moveq #3,d7
fmove.s fp6,0(a3,d7.l*4)
fmovem.x (a7)+,[LATEST]
movem.l (a7)+,#L11
rts
XDEF _rot
_rot
L14 EQU $38
L15 EQU $C8C
movem.l #L15,-(a7)
fmovem.x fp5/fp6/fp7,-(a7)
move.s L14+4(a7),d2
move.b L14+$8(a7),d3
move.l userbreak_flagpos,a1
btst #4,(a1)
bne L12
tst.b _vdevice
bne L3
pea L16
jsr _verror
addq.l #4,a7
L3
tst.b _vdevice+2
beq L4
pea 3.w
jsr _newtokens
addq.l #4,a7
move.l d0,a2
move.l a2,a3
moveq #0,d7
move.l #$27,0(a3,d7.l*4)
move.l a2,a3
moveq #1,d7
move.l d2,0(a3,d7.l*4)
extb.l d3
move.l a2,a3
moveq #2,d7
move.l d3,0(a3,d7.l*4)
fmovem.x (a7)+,[LATEST]
movem.l (a7)+,#L15
rts
L4
fmove.s d2,fp7
fmul.d #$.3F91DF46.A2529D2E,fp7
fmove.d fp7,-(a7)
jsr _cos__r
addq.l #$8,a7
fmove.x fp0,fp6
fmove.s d2,fp7
fmul.d #$.3F91DF46.A2529D2E,fp7
fmove.d fp7,-(a7)
jsr _sin__r
addq.l #$8,a7
fmove.x fp0,fp6
cmp.b #$78,d3
bgt.b L17
beq L6
cmp.b #$59,d3
bgt.b L18
beq L7
cmp.b #$58,d3
beq L6
bra L9
L18
cmp.b #$5A,d3
beq L8
bra L9
L17
cmp.b #$79,d3
beq L7
cmp.b #$7A,d3
beq L8
bra L9
L6
move.l _vdevice+$14,a3
lea $10(a3),a3
moveq #0,d7
fmove.s 0(a3,d7.l*4),fp6
fmove.x fp6,fp7
fmul.x fp6,fp7
move.l _vdevice+$14,a3
lea $20(a3),a3
moveq #0,d7
fmove.x fp6,fp5
fmul.s 0(a3,d7.l*4),fp5
fadd.x fp5,fp7
move.l _vdevice+$14,a3
lea $10(a3),a3
moveq #0,d7
fmove.s fp7,0(a3,d7.l*4)
move.l _vdevice+$14,a3
lea $20(a3),a3
moveq #0,d7
fmove.x fp6,fp7
fmul.s 0(a3,d7.l*4),fp7
fmove.x fp6,fp5
fmul.x fp6,fp5
fsub.x fp5,fp7
move.l _vdevice+$14,a3
lea $20(a3),a3
moveq #0,d7
fmove.s fp7,0(a3,d7.l*4)
move.l _vdevice+$14,a3
lea $10(a3),a3
moveq #1,d7
fmove.s 0(a3,d7.l*4),fp6
fmove.x fp6,fp7
fmul.x fp6,fp7
move.l _vdevice+$14,a3
lea $20(a3),a3
moveq #1,d7
fmove.x fp6,fp5
fmul.s 0(a3,d7.l*4),fp5
fadd.x fp5,fp7
move.l _vdevice+$14,a3
lea $10(a3),a3
moveq #1,d7
fmove.s fp7,0(a3,d7.l*4)
move.l _vdevice+$14,a3
lea $20(a3),a3
moveq #1,d7
fmove.x fp6,fp7
fmul.s 0(a3,d7.l*4),fp7
fmove.x fp6,fp5
fmul.x fp6,fp5
fsub.x fp5,fp7
move.l _vdevice+$14,a3
lea $20(a3),a3
moveq #1,d7
fmove.s fp7,0(a3,d7.l*4)
move.l _vdevice+$14,a3
lea $10(a3),a3
moveq #2,d7
fmove.s 0(a3,d7.l*4),fp6
fmove.x fp6,fp7
fmul.x fp6,fp7
move.l _vdevice+$14,a3
lea $20(a3),a3
moveq #2,d7
fmove.x fp6,fp5
fmul.s 0(a3,d7.l*4),fp5
fadd.x fp5,fp7
move.l _vdevice+$14,a3
lea $10(a3),a3
moveq #2,d7
fmove.s fp7,0(a3,d7.l*4)
move.l _vdevice+$14,a3
lea $20(a3),a3
moveq #2,d7
fmove.x fp6,fp7
fmul.s 0(a3,d7.l*4),fp7
fmove.x fp6,fp5
fmul.x fp6,fp5
fsub.x fp5,fp7
move.l _vdevice+$14,a3
lea $20(a3),a3
moveq #2,d7
fmove.s fp7,0(a3,d7.l*4)
move.l _vdevice+$14,a3
lea $10(a3),a3
moveq #3,d7
fmove.s 0(a3,d7.l*4),fp6
fmove.x fp6,fp7
fmul.x fp6,fp7
move.l _vdevice+$14,a3
lea $20(a3),a3
moveq #3,d7
fmove.x fp6,fp5
fmul.s 0(a3,d7.l*4),fp5
fadd.x fp5,fp7
move.l _vdevice+$14,a3
lea $10(a3),a3
moveq #3,d7
fmove.s fp7,0(a3,d7.l*4)
move.l _vdevice+$14,a3
lea $20(a3),a3
moveq #3,d7
fmove.x fp6,fp7
fmul.s 0(a3,d7.l*4),fp7
fmove.x fp6,fp5
fmul.x fp6,fp5
fsub.x fp5,fp7
move.l _vdevice+$14,a3
lea $20(a3),a3
moveq #3,d7
fmove.s fp7,0(a3,d7.l*4)
bra L5
L7
move.l _vdevice+$14,a3
moveq #0,d7
fmove.s 0(a3,d7.l*4),fp6
fmove.x fp6,fp7
fmul.x fp6,fp7
move.l _vdevice+$14,a3
lea $20(a3),a3
moveq #0,d7
fmove.x fp6,fp5
fmul.s 0(a3,d7.l*4),fp5
fsub.x fp5,fp7
move.l _vdevice+$14,a3
moveq #0,d7
fmove.s fp7,0(a3,d7.l*4)
fmove.x fp6,fp7
fmul.x fp6,fp7
move.l _vdevice+$14,a3
lea $20(a3),a3
moveq #0,d7
fmove.x fp6,fp5
fmul.s 0(a3,d7.l*4),fp5
fadd.x fp5,fp7
move.l _vdevice+$14,a3
lea $20(a3),a3
moveq #0,d7
fmove.s fp7,0(a3,d7.l*4)
move.l _vdevice+$14,a3
moveq #1,d7
fmove.s 0(a3,d7.l*4),fp6
fmove.x fp6,fp7
fmul.x fp6,fp7
move.l _vdevice+$14,a3
lea $20(a3),a3
moveq #1,d7
fmove.x fp6,fp5
fmul.s 0(a3,d7.l*4),fp5
fsub.x fp5,fp7
move.l _vdevice+$14,a3
moveq #1,d7
fmove.s fp7,0(a3,d7.l*4)
fmove.x fp6,fp7
fmul.x fp6,fp7
move.l _vdevice+$14,a3
lea $20(a3),a3
moveq #1,d7
fmove.x fp6,fp5
fmul.s 0(a3,d7.l*4),fp5
fadd.x fp5,fp7
move.l _vdevice+$14,a3
lea $20(a3),a3
moveq #1,d7
fmove.s fp7,0(a3,d7.l*4)
move.l _vdevice+$14,a3
moveq #2,d7
fmove.s 0(a3,d7.l*4),fp6
fmove.x fp6,fp7
fmul.x fp6,fp7
move.l _vdevice+$14,a3
lea $20(a3),a3
moveq #2,d7
fmove.x fp6,fp5
fmul.s 0(a3,d7.l*4),fp5
fsub.x fp5,fp7
move.l _vdevice+$14,a3
moveq #2,d7
fmove.s fp7,0(a3,d7.l*4)
fmove.x fp6,fp7
fmul.x fp6,fp7
move.l _vdevice+$14,a3
lea $20(a3),a3
moveq #2,d7
fmove.x fp6,fp5
fmul.s 0(a3,d7.l*4),fp5
fadd.x fp5,fp7
move.l _vdevice+$14,a3
lea $20(a3),a3
moveq #2,d7
fmove.s fp7,0(a3,d7.l*4)
move.l _vdevice+$14,a3
moveq #3,d7
fmove.s 0(a3,d7.l*4),fp6
fmove.x fp6,fp7
fmul.x fp6,fp7
move.l _vdevice+$14,a3
lea $20(a3),a3
moveq #3,d7
fmove.x fp6,fp5
fmul.s 0(a3,d7.l*4),fp5
fsub.x fp5,fp7
move.l _vdevice+$14,a3
moveq #3,d7
fmove.s fp7,0(a3,d7.l*4)
fmove.x fp6,fp7
fmul.x fp6,fp7
move.l _vdevice+$14,a3
lea $20(a3),a3
moveq #3,d7
fmove.x fp6,fp5
fmul.s 0(a3,d7.l*4),fp5
fadd.x fp5,fp7
move.l _vdevice+$14,a3
lea $20(a3),a3
moveq #3,d7
fmove.s fp7,0(a3,d7.l*4)
bra L5
L8
move.l _vdevice+$14,a3
moveq #0,d7
fmove.s 0(a3,d7.l*4),fp6
fmove.x fp6,fp7
fmul.x fp6,fp7
move.l _vdevice+$14,a3
lea $10(a3),a3
moveq #0,d7
fmove.x fp6,fp5
fmul.s 0(a3,d7.l*4),fp5
fadd.x fp5,fp7
move.l _vdevice+$14,a3
moveq #0,d7
fmove.s fp7,0(a3,d7.l*4)
move.l _vdevice+$14,a3
lea $10(a3),a3
moveq #0,d7
fmove.x fp6,fp7
fmul.s 0(a3,d7.l*4),fp7
fmove.x fp6,fp5
fmul.x fp6,fp5
fsub.x fp5,fp7
move.l _vdevice+$14,a3
lea $10(a3),a3
moveq #0,d7
fmove.s fp7,0(a3,d7.l*4)
move.l _vdevice+$14,a3
moveq #1,d7
fmove.s 0(a3,d7.l*4),fp6
fmove.x fp6,fp7
fmul.x fp6,fp7
move.l _vdevice+$14,a3
lea $10(a3),a3
moveq #1,d7
fmove.x fp6,fp5
fmul.s 0(a3,d7.l*4),fp5
fadd.x fp5,fp7
move.l _vdevice+$14,a3
moveq #1,d7
fmove.s fp7,0(a3,d7.l*4)
move.l _vdevice+$14,a3
lea $10(a3),a3
moveq #1,d7
fmove.x fp6,fp7
fmul.s 0(a3,d7.l*4),fp7
fmove.x fp6,fp5
fmul.x fp6,fp5
fsub.x fp5,fp7
move.l _vdevice+$14,a3
lea $10(a3),a3
moveq #1,d7
fmove.s fp7,0(a3,d7.l*4)
move.l _vdevice+$14,a3
moveq #2,d7
fmove.s 0(a3,d7.l*4),fp6
fmove.x fp6,fp7
fmul.x fp6,fp7
move.l _vdevice+$14,a3
lea $10(a3),a3
moveq #2,d7
fmove.x fp6,fp5
fmul.s 0(a3,d7.l*4),fp5
fadd.x fp5,fp7
move.l _vdevice+$14,a3
moveq #2,d7
fmove.s fp7,0(a3,d7.l*4)
move.l _vdevice+$14,a3
lea $10(a3),a3
moveq #2,d7
fmove.x fp6,fp7
fmul.s 0(a3,d7.l*4),fp7
fmove.x fp6,fp5
fmul.x fp6,fp5
fsub.x fp5,fp7
move.l _vdevice+$14,a3
lea $10(a3),a3
moveq #2,d7
fmove.s fp7,0(a3,d7.l*4)
move.l _vdevice+$14,a3
moveq #3,d7
fmove.s 0(a3,d7.l*4),fp6
fmove.x fp6,fp7
fmul.x fp6,fp7
move.l _vdevice+$14,a3
lea $10(a3),a3
moveq #3,d7
fmove.x fp6,fp5
fmul.s 0(a3,d7.l*4),fp5
fadd.x fp5,fp7
move.l _vdevice+$14,a3
moveq #3,d7
fmove.s fp7,0(a3,d7.l*4)
move.l _vdevice+$14,a3
lea $10(a3),a3
moveq #3,d7
fmove.x fp6,fp7
fmul.s 0(a3,d7.l*4),fp7
fmove.x fp6,fp5
fmul.x fp6,fp5
fsub.x fp5,fp7
move.l _vdevice+$14,a3
lea $10(a3),a3
moveq #3,d7
fmove.s fp7,0(a3,d7.l*4)
bra L5
L9
pea L19
jsr _verror
addq.l #4,a7
L5
fmovem.x (a7)+,[LATEST]
movem.l (a7)+,#L15
rts
XDEF _rotate
_rotate
L20 EQU -$10
link a5,#L20+16
L21 EQU $80
movem.l #L21,-(a7)
fmovem.x fp7,-(a7)
move.l userbreak_flagpos,a1
btst #4,(a1)
bne L12
move.b $A(a5),-(a7)
move.w $8(a5),d7
ext.l d7
fmove.l d7,fp7
fdiv.s #$.41200000,fp7
fmove.s fp7,-(a7)
bsr _rot
addq.l #6,a7
fmovem.x (a7)+,[LATEST]
movem.l (a7)+,#L21
unlk a5
rts
L12
XREF userbreak
jsr userbreak
L19
dc.b 'rot: illegal axis of rotation',0
L16
dc.b 'rot: vogl not initialised',0
L13
dc.b 'translate: vogl not initialised',0
SECTION ":0",CODE
L12
jsr userbreak
END